import {Ajax} from '../utils/request'

const addCarts = (data) => Ajax.post("/api/carts",data)

const getCratList = (data) => Ajax.get("/api/carts",data)

const changeCheck = (data) => Ajax.patch("/api/carts/checked",data)

const changecarts = (crat,data) =>Ajax.put("/api/carts/" + crat ,data)

const removeCrats = (cratId) => Ajax.delete("/api/carts/" + cratId)

export {
  addCarts,
  getCratList,
  changeCheck,
  changecarts,
  removeCrats
}